#include <stdio.h>
#include "ofc/DBitArray.h"

int main(int argc, char *argv[])
{
  DBitArray *array = [DBitArray alloc];

  [array init :1 :25];         // Initialise the array for values from 1..25

  [array set   :7];            // Set value 7 in the array
  [array set   :9 :20];        // Set values 9..20 in the array
  [array reset :11];           // Reset value 11 in the array
  [array reset :15 :18];       // Reset values 15..18 in the array

                               // Checking values
  printf("Value 10 is %s\n", [array has :10] ? "set" : "reset");
  printf("Value  8 is %s\n", [array has :8 ] ? "set" : "reset");

  printf("Threre are %d values set\n", [array count]);

  [array free];                // Cleanup

  return 0;
}

